<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<hr>
<table >
	<TR bgcolor="#9D9D9D">
		<TD>名称</TD>
		<TD>地址</TD>
		<TD>菜系</TD>
		<TD>电话</TD>
		<TD>营业时间</TD>
	</TR>
	<logic:present name="shopsList">
	<logic:iterate id="shop" name="shopsList" scope="session">
	<TR>
		<TD><bean:write name="shop" property="name" scope="page"/></TD>
		<TD><bean:write name="shop" property="address" scope="page"/></TD>
		<TD><bean:write name="shop" property="cuisine" scope="page"/></TD>
		<TD><bean:write name="shop" property="telephone" scope="page"/></TD>
		<TD><bean:write name="shop" property="shopHours" scope="page"/></TD>
		<TD></TD>
	</TR>
	</logic:iterate>
	</logic:present>
	</table>
	<br>
	<hr>
	<br>
<table><tr><td>商店订单</td></tr>
	<tr align="left"><td><form name="form1" method="post" action="orders.do?method=findOrder">
	<input name="id" type="text" id="textfield" size="10" value="请输入订单号">
	<input type="submit" name="button" id="button" value="搜索"></form></td></tr>
	<TR bgcolor="#9D9D9D">
		<TD>编码</TD>
		<TD>创建时间</TD>
		<TD>人数</TD>
		<TD>状态</TD>
		<TD>识别码</TD>
		<TD>操作</TD>
	</TR>
	<logic:present name="order_list">
	<logic:iterate id="orders" name="order_list" scope="request">
	<TR>
		<TD><bean:write name="orders" property="id" scope="page" format="#"/></TD>
		<TD><bean:write name="orders" property="date" scope="page" format="yyyy-MM-dd HH:mm:ss"/></TD>
		<TD><bean:write name="orders" property="customerNumber" scope="page" format="#"/></TD>
		<TD><bean:write name="orders" property="state" scope="page" /></TD>
		<TD><bean:write name="orders" property="identification" scope="page" format="#"/></TD>
		<TD><a href='jumptomanager.do?method=toOrderEdit&id=<bean:write name="orders" property="id" scope="page" format="#"/>'>修改</a>
		<a href="orders.do?method=delete&shop_name=<bean:write name="shop" property="name" scope="page"/>&id=<bean:write name="orders" property="id" scope="page" format="#"/>">删除</a>
		<a href="address.do?method=delete&id=<bean:write name="orders" property="id" scope="page" format="#"/>">导出</a></TD>
	</TR>
	</logic:iterate>
	</logic:present>
</table>
<hr>
<table><tr><td>商店餐桌</td></tr>
	<TR bgcolor="#9D9D9D">
		<TD>编码</TD>
		<TD>编号</TD>
		<TD>餐桌类型</TD>
		<TD>是否锁定</TD>
		<TD>容量</TD>
		<TD>操作</TD>
	</TR>
	<logic:present name="table_list">
	<logic:iterate id="table" name="table_list" scope="request">
	<TR>
		<TD><bean:write name="table" property="id" scope="page" format="#"/></TD>
		<TD><bean:write name="table" property="number" scope="page" format="#"/></TD>
		<TD><bean:write name="table" property="type" scope="page" format="#"/></TD>
		<TD><bean:write name="table" property="state" scope="page" /></TD>
		<TD><bean:write name="table" property="capacity" scope="page" format="#"/></TD>
		<form name="form1" method="post" action='jumptowaiter.do?method=updateTable&shop_name=<bean:write name="shop" property="name" scope="page" format="#"/>&id=<bean:write name="table" property="id" scope="page" format="#"/>'>
		<td>
			<select name="state"> 				
  				<option value ="1">锁定</option>
  				<option value ="0">解锁</option>
			</select>
		</td>	
  		<td><input type="submit" name="button" id="button" value="确定"></td>
		</form>
	</TR>
	</logic:iterate>
	</logic:present>
</table>
</body>
</html>